<h2 class="h2-title">Thông tin sản phẩm !!!</h2>

<?php if(isset($msg) AND $msg != ''):?>
<ul class="notification err">
    <li class="notifi_img"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_circle.png"/></li>

    <li class="msg"><?=$msg?></li>

    <li class="close"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_grey_small.png"/></li>

</ul><!--End of .notification -->

<?php else:?>

<div class="form_input_index">
    <ul class="form_text">
    <form action="<?=base_url()?>backend/product/editproduct/<?=$product->product_id?>" method="POST">
        <li class="text_input">Tên sản phẩm</li>
        <li><input type="text" value="<?=$product->product_name?>" name="product_name" class="input-post"/></li>
        <?= form_error('product_name','<li class="errors">','</li>'); ?>

        <li class="text_input">Tiêu đề không dấu</li>
        <li><input type="text" value="<?=$product->product_title?>" name="product_title" class="input-post"/></li>
        <?= form_error('product_title','<li class="errors">','</li>'); ?>

        <li class="text_input">Hình ảnh</li>
        <input type="text" value="<?=$product->product_img?>" id="product_img_edit" name="product_img_edit" />
        <input type="hidden" value="<?=$product->product_thumb?>" id="product_thumb_edit" name="product_thumb_edit" /><br /><br />
        <?= form_error('product_img_edit','<li class="errors">','</li>'); ?>
        <?= form_error('product_thumb_edit','<li class="errors">','</li>'); ?>
        <li id="productthumbsedit">
            <img src="<?=base_url()?><?=$product->product_thumb?>" />
        </li>

        <li class="text_input">Giá</li>
        <li><input type="text" value="<?=$product->product_price?>" name="product_price" class="input-post"/></li>
        <?= form_error('product_price','<li class="errors">','</li>'); ?>

        <li class="text_input">Giá khuyến mãi</li>
        <li><input type="text" value="<?=$product->product_price_sale?>" name="product_price_sale" class="input-post"/></li>
        <?= form_error('product_price_sale','<li class="errors">','</li>'); ?>

        <li class="text_input">Số lượng</li>
        <li><input type="text" value="<?=$product->product_quantity?>" name="product_quantity" class="input-post"/></li>
        <?= form_error('product_quantity','<li class="errors">','</li>'); ?>

        <li class="text_input">Mô tả</li>
        <textarea class="ckeditor ck" style="width: 700px!important;height: 150px!important;color:#EA9533"  name="product_des"><?=$product->product_des?></textarea>
        <?= form_error('product_des','<li class="errors">','</li>'); ?>

        <li class="text_input">Loại sản phẩm</li>
        <select name="product_categories">
            <?php if(!empty($menus)):?>
                <?php $count = 0; ?>
                <?php foreach($menus as $menu):?>
                    <option value="<?=$menu->menu_id?>" <?php if($menu->menu_id == $product->product_categories) echo " selected " ?>><?=$menu->menu_name?></option>
                    <?php unset($menus[$count])?>
                    <?php $count++ ?>
                <?php endforeach;?>
            <?php endif;?>
        </select>

        <li class="text_input">Sản phẩm nổi bật</li>
        <select name="product_hightlight">
            <option value="0" <?php if($product->product_hightlight == 0) echo " selected "?>>Không</option>
            <option value="1" <?php if($product->product_hightlight == 1) echo " selected "?>>Có</option>
        </select>

        <li class="text_input">Trạng thái</li>
        <select name="product_status">
            <option value="1" <?php if($product->product_status == 1) echo " selected "?>>Hiển thị</option>
            <option value="0" <?php if($product->product_status == 0) echo " selected "?>>Không</option>
        </select>
        <div style="clear: both;"></div>
        <input type="submit" class="sub" value="Đồng ý" name="sub"/>
        <input type="reset" class="sub" value="Nhập lại" name="sub"/>
    </form>
    </ul>
</div>
<?php endif;?>